package com.thermofisher.dsc.amanda.common.excel.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;

/**
 * Created by wenjie.yang on 4/3/2019.
 */
@Getter
@Setter
public class SaleCustomer extends BaseRowModel implements Validate{

  @ExcelProperty(index = 0)
  private String ship2NO;

  @ExcelProperty(index = 1)
  private String  ship2mailing;

  @ExcelProperty(index = 2)
  private String customerNo;

  @ExcelProperty(index = 3)
  private String customerLocName;

  @ExcelProperty(index = 4)
  private String positionType;

  @ExcelProperty(index = 5)
  private String positionName;

  @ExcelProperty(index = 6)
  private String salesRepLocName;

  @ExcelProperty(index = 7)
  private String email;

  @ExcelProperty(index = 8)
  private String type;

  @Override
  public String toString() {
    return "SaleCustomer{" +
        "ship2NO='" + ship2NO + '\'' +
        ", ship2mailing='" + ship2mailing + '\'' +
        ", customerNo='" + customerNo + '\'' +
        ", customerLocName='" + customerLocName + '\'' +
        ", positionType='" + positionType + '\'' +
        ", positionName='" + positionName + '\'' +
        ", salesRepLocName='" + salesRepLocName + '\'' +
        ", email='" + email + '\'' +
        ", type='" + type + '\'' +
        '}';
  }


  @Override
  public boolean validate() {
    if(StringUtils.isBlank(this.ship2NO)){
      return false;
    }
    return true;
  }
}
